package game.classes.particles.displays
{
	import engine.utils.GraphicUtils;
	import engine.utils.MathUtils;
	
	import flash.display.BlendMode;
	import flash.display.Shape;
	
	public class Star extends Shape
	{
		private var _color:uint;
		private var _outer:Number;
		private var _inner:Number;
		private var _numPoints:int;
		
		public function Star(color:uint, outer:Number, inner:Number, numPoints:int)
		{
			this._color = color;
			this._outer = outer;
			this._inner = inner;
			this._numPoints = numPoints;
			
			this.draw();
		}
		
		private function draw():void
		{
			this.graphics.clear();
			this.graphics.beginFill(this._color);
			GraphicUtils.drawStar(this.graphics, this._outer, this._inner, this._numPoints);
			this.graphics.endFill();
		}
		
		public function get color():uint { return this._color; }
		public function set color(color:uint):void
		{
			this._color = color;
			this.draw();
		}
		
		public function get outer():Number { return this._outer; }
		public function set outer(outer:Number):void
		{
			this._outer = outer;
			this.draw();
		}
		
		public function get inner():Number { return this._inner; }
		public function set inner(inner:Number):void
		{
			this._inner = inner;
			this.draw();
		}
		
		public function get numPoints():int { return this._numPoints; }
		public function set numPoints(numPoints:int):void
		{
			this._numPoints = numPoints;
			this.draw();
		}
	}
}